/***************************************************************************
 *   Copyright (C) 2009 by Marcin Swiechowicz   *
 *   marcin.swiechowicz@gmail.com   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
#ifndef KDCPLUGININTERFACE_H
#define KDCPLUGININTERFACE_H

#include "kdcnamespace.h"
#include "kdcbaseinterface.h"
#include "kdcconfigpageinterface.h"

#include <QObject>
#include <kparts/plugin.h>
#include <QList>

#include <kdemacros.h>

class KDCObject;
class QWidget;
class KIcon;
class KPluginInfo;

class KDE_EXPORT KDCPluginInterface : public KParts::Plugin, public KDCBaseInterface
{
Q_OBJECT
public:
	KDCPluginInterface( QObject *aParent = 0 );
	virtual ~KDCPluginInterface();
	virtual const KPluginInfo& info() const = 0;
	// must be deleted by plugin
	virtual QWidget* widget() const = 0;
	virtual KDCConfigPageInterface* configPage() const = 0;
	virtual KDC::Position tabPosition() const = 0;

	virtual bool load() = 0;
	virtual bool unload() = 0;
	virtual bool setInterfaces( QList<KDCBaseInterface*>& aInterfaces ) = 0;
	virtual bool init() = 0;

	virtual KDCObject* currentObject() const = 0;
public slots:
	virtual void refresh() = 0;
	virtual void setObject( KDCObject *aObject ) = 0;
signals:
	void message( const QString& aMsg, KDC::MessageType aMessageType = KDC::Info ); 
	void objectChanged( KDCObject *aObject );
};
#endif
